package demo.src.main.com.example.mq.mqcomsumer;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;
import org.springframework.stereotype.Component;

@Component
public class SpringDirectConsumer implements MessageListener {


    public void onMessage(Message message) {

        System.out.println("消费方消费的消息："+new String(message.getBody()));
    }
}
